﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;
using Wolfy.Angularjs_Mvc_SPA.Models;

namespace Wolfy.Angularjs_Mvc_SPA
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            //初始化db
            //分页用
            for (int i = 0; i < 10; i++)
            {
                ListDb<Product>.CreateList().Lst.Add(new Product { Dt = DateTime.Now, Id = i + 1, Name = "商品" + i.ToString(), Price = i + 20 });
            }
        }
    }
}
